package org.yuezejian.alarm.netty.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@ConfigurationProperties(prefix = "netty")
public class NettyConfig {
    private List<HandlerConfig> handlers;

    public List<HandlerConfig> getHandlers() {
        return handlers;
    }

    public void setHandlers(List<HandlerConfig> handlers) {
        this.handlers = handlers;
    }

    public static class HandlerConfig {
        private String name;
        private String type;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }
    }
}
